import React from 'react';
import styles from './style.css'
import MyIcon from "../../component/Icon/icon";
import Cookie from 'js-cookie'


import Map from 'lodash.map'
import Tloader from 'react-touch-loader';
import MyTabs from "../../component/MyTabs";

class Congrats extends React.Component {
    constructor(props) {
        super()
        this.state = {
            hasMore: true,
            autoLoadMore: false,
            headStylesTop: 97,
            array: [1],
            user: {
                userImage: ""
            }
        }
    }


    handleLoadMore(resolve) {
        var self = this;
        // cc("handleLoadMore")
        setTimeout(() => {
            if (this.state.array.length >= 2) {
                self.setState({
                    hasMore: false,
                })
            } else {
                self.state.array.push(1)
                self.setState({
                    array: this.state.array,
                })
                if (self.state.array.length >= 2) {
                    self.setState({
                        hasMore: false,
                    })
                }
            }

            resolve()
        }, 1000)
    }

    render() {
        return <div className={styles.Congrats}>
            <div className={styles.wrapperImage}>
                <img src="/static/Badge.png" alt=""/>
            </div>
            <div className={styles.h1}>Congrats!</div>
            <div className={styles.small}>
                You unlocked a new badge!
            </div>
            <div className={styles.wrapperBtn}>
                <div className={styles.button}>Awesome!</div>
            </div>
        </div>
    }
}

export default Congrats